﻿@model IEnumerable<HotelManageSystem.Models.WageModelDetial> 
<link href= "@Url.Content("~/Content/TelerikGrid.css")"rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery-1.7.1.min.js")" type="text/javascript"></script>
<script type="text/javascript">
    $(document).ready(function () {
        $(".t-grid-content").attr("style", "height:80%");
    });
</script>
@(
 Html.Telerik().Grid(Model)
         .Name("WageManageGrid")
         .DataKeys(keys => keys.Add(r => r.Id))
         .DataBinding(dataBinding => dataBinding.Ajax()
                .OperationMode(GridOperationMode.Client)
                .Select("WageManageAjax", "Wage")
                .Delete("WageManageDelete", "Wage")
            )
         .Sortable(sorting => sorting
                .SortMode(GridSortMode.SingleColumn))
         .Pageable(paging => paging
                .Style(GridPagerStyles.NextPreviousAndNumeric)
                .Position(GridPagerPosition.Bottom)
                .PageSize(11))
         .Columns(columns =>
                      {
                          columns.Bound(d => d.Id).Width(50).Filterable(false);
                          columns.Bound(d => d.EmployeeId);
                          columns.Bound(d => d.Name);
                          columns.Bound(d => d.BasicWage).Format("{0:0}").Filterable(false).Sortable(false);
                          columns.Bound(d => d.BasicValue).Format("{0:0}").Filterable(false).Sortable(false);
                          columns.Bound(d => d.EndowmentAssurance).Format("{0:0}").Filterable(false).Sortable(false);
                          columns.Bound(d => d.MedicalInsurance).Format("{0:0}").Filterable(false).Sortable(false);
                          columns.Bound(d => d.UnemploymentInsurance).Format("{0:0}").Filterable(false).Sortable(false);
                          columns.Bound(d => d.EmploymentInjuryInsurance).Format("{0:0}").Filterable(false).Sortable(false);
                          columns.Bound(d => d.MaternityInsurance).Format("{0:0}").Filterable(false).Sortable(false);
                          columns.Bound(d => d.ProvidentFund).Format("{0:0}").Filterable(false).Sortable(false);
                          columns.Bound(d => d.TakeOff).Width(50).Format("{0:0}").Filterable(false).Sortable(false);
                          columns.Bound(d => d.Subsidy).Width(50).Format("{0:0}").Filterable(false).Sortable(false);
                          columns.Bound(d => d.ActualWage).Format("{0:0}").Filterable(false).Sortable(false);
                          columns.Bound(d => d.WageDay).Width(120).Filterable(false);
                          columns.Command(commands => commands.Delete()).Width(150);
                      })
         .Selectable()
         .Filterable()
         .Scrollable()
)
